<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<f:subview id="conf425475">
    <html>
        <head>

            <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
            <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
            <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
            <!-- -->
            <link rel="stylesheet" type="text/css" href="../scripts/tabs/slidingtabs-horizontal.css">
            <script type="text/javascript" src="../scripts/tabs/slidetab.js"></script>
            <!-- -->
            <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
            <link rel="stylesheet" type="text/css" href="../css/dropdown.css"/>
            <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
            <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.rateit.js"></script>
            <script type="text/javascript" language="javascript" src="../scripts/jQuery/easypaginate.js"></script>
            <link rel="stylesheet" type="text/css" href="../css/rateit.css">
            <script type="text/javascript" language="javascript">
                var open_cur = 0;
                $j = jQuery.noConflict();
                $j(document).ready(function(){
                    $j('input#leavedate111').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                    $j('input#leavedate112').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                    $j('input#leavedate1a').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                    $j('input#leavedate1b').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                    initThickBox('.thickbox');
                 
                   
                    $j('.keysearch').live('keyup',function(){
                        if($j('.keysearch').val() == ""){
                            $j('.rich-table-row').show();
                                   
                        }else{
                            $j('.rich-table-row').hide();
                            $j('.rich-table-row').each(function(){
                                html = $j(this).html();
                                if(   ununicode(html).indexOf(  ununicode($j('.keysearch').val()) ) > -1    )  {
                                    $j(this).show();
                                }else{
                                    $j(this).hide();
                                }
                            });
                        }

                    });
                    $j(".checkAll").live("click",function(){
                        flag = $j('.checkAll').is(':checked');

                        $j(".check_select").each(function(){
                            $j('.check_select')  .attr('checked', flag);
                        });


                    });
                    $j(".rich-table-row:odd").addClass("odd");
                    
                    // Begin Event load ajax form CRM
                   
                    $j('.contactN950').live('click',function(){
                        object = $j(this).next();
                        var pn100ED  =$j('.customer-box').attr("lang");                        
                        var pn100KH = $j('#formKHCN\\:pn100').val();                     
                       
                       
                        $j.post("contactCRM.jsp?action=editajaxpage&pn100="+ pn100KH+"&table=N100", function(data){
                            $j('.customer-boxcontact').html(data);
                        });
                         
                        
                    
                    });
                    $j('.acountT025').live('click',function(){
                        object = $j(this).next();
                        var pn100KH = $j('#formKHCN\\:pn100').val();   
                        $j.post("accountCRM.jsp?action=editajaxpage&pn100="+pn100KH+"&tv026=N100",function(data){
                            $j('.customer-boxacount').html(data);
                        }) ;
                    
                    });
                
                    $j('.customerK100').live('click',function(){
                        object = $j(this).next();
                        var pn100KH = $j('#formKHCN\\:pn100').val(); 
                        $j.post("customerdemo.jsp?action=editEmp&pn100="+ pn100KH+"&table=formload&pt025=1&itemid=N100", function(data){
                            $j('.customer-boxcustomer').html(data);
                        });
                    
                    });
                
                    $j('.infoN350').live('click',function(){
                        object = $j(this).next();
                        var pn100KH = $j('#formKHCN\\:pn100').val(); 
                        $j.post("passportCRM.jsp?action=editajaxpage&pn100="+ pn100KH, function(data){
                            $j('.customer-boxN350').html(data);
                        });
                    
                    });
                    $j('.companyCRM').live('click',function(){
                        object = $j(this).next();
                        var pn100KH = $j('#formKHCN\\:pn100').val(); 
                        $j.post("companyCRM.jsp?action=editajaxpage&pn100="+ pn100KH, function(data){
                            $j('.customer-companyCRM').html(data);
                        }) ;
                    
                    }); 
                    
                    // End Event load ajax form CRM for Dashbord
                    // Show hide form customerInputExpand from Customer
                    $j('.header-box').live('click', function(){    
                        $j(".mesage").text("");
                        if($j(this).next('.customer-box').css('display') != 'none'){
                            return;
                        }else{
                            //var PN100=$j('#form-input-customerform\\:PN100').val();
                            var PN100 = $j('#formKHCN\\:pn100').val(); 
                            if(PN100 != 0)
                            {
                                $j('.messa').hide();
                                $j('.customer-box').slideUp();                         
                                $j('.boder-bomttom').removeClass('boder-bomttom');
                                $j(this).next('.customer-box').slideDown();
                                $j(this).addClass('boder-bomttom');
                            } else{                        
                                $j('.messa').show();
                                $j(this).next('.customer-box').css('display') != 'none'
                            }
                           
                        }

                    });
                    $j('.vv031').live('click',function(){
                        $j(this).parents('.group_manager').parents('.item').find('.edit_more').find('.select_hidden').find('.menu-context-tour').trigger('click');
                    });
                    
                    
                    // Lịch sử khách hàng
                    $j('.loadHistory').live('click',function(){
                        dayss = $j(this).attr('lang');
                        window.location.href="customer.jsp?action=reloadfordays&dayss="+dayss;
                        
                    });
                    $j(".closeBirthday").live('click',function(){
                        $j(this).parent().hide();
                    });
                });
            </script>
            <script type="text/javascript" language="javascript">
                var open_cur = 0;
                $j = jQuery.noConflict();
                $j(document).ready(function(){
                    //search client
                    //searchClient();
                   
                    $j('.text_search').live('keyup',function(){
                        if($j('.text_search').val() == ""){
                        
                            $j('.item').show();
                            $j('.close').trigger('click');   
                        }else{
                            $j('.close').trigger('click');
                            $j('.item').hide();
                            $j('.item').each(function(){
                                html = $j(this).html();
                                if(   ununicode(html).indexOf(  ununicode($j('.text_search').val()) ) > -1    )  {
                                    $j(this).show();
                                }else{
                                    $j(this).hide();
                                }
                            });
                        }

                    });
                    //
                    initThickBox('.thickbox');
                    $j('.st_horizontal').slideTabs();
                    Tab4Kapi();
                    $j('a.button.edit').live('click',function() {
                     
                        $j(this).parent("div").parent("div").hide().next("div").show();
                    
                    });
                   
                    $j(".rateit").bind('rated', function (event, value) { 
                        pn100 = $j(this).attr('lang');
                        
                        star_value = value;
                       
                        $j.post("star.jsp?action=favourite&flag=star&ni105="+star_value+'&pn100='+pn100,function(){
                        
                        });
                    });
             
                    $j('.search_box').hide();       
                    $j('.sidebar_search').live('click',function(){
                        $j('.search_box').hide();
                        if($j(this).next().hasClass('active')){

                            $j('.search_box').removeClass('active');
                        }else{

                            $j('.search_box').removeClass('active');
                            $j(this).next().addClass('active');
                            $j(this).next().show();
                        }
                    });
                    $j(".content_right").live("click",function(){
                        $j('.search_box').hide();
                    });
                    $j(".updateV500").live("click",function(){
                        pn100 = $j(this).parent(".group_list_cus_tour").attr('lang');
                        pv050 = $j(this).attr('lang');
                        vv031 = $j(this).text();
                      
                        $j.post('v030Begin.jsp?action=updateV030&pn100='+pn100+'&pv050='+pv050+'&vv031='+vv031,function(data){
                            if(data!= null){
                                hidePleaseWait(); 
                                window.location.href="customer.jsp";
                            }
                        });
                        
                        
                    });
                    $j(".updateq400").live("click",function(){
                        pn100 = $j(this).parent(".group_list_cus").attr('lang');
                       
                        pk400 = $j(this).attr('lang');
                        kv401 = $j(this).text();
                        showPleaseWait();
         
                        $j.post('k400Begin.jsp?action=updateK400N&pn100='+pn100+'&pk400='+pk400+'&kv401='+kv401,function(data){
                            if(data!= null){
                                hidePleaseWait(); 
                            }
                        });
                    
                    });
                    
                   
                }); 
            </script>

        </head>
        <body>

            <a4j:form id="myform">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <h:outputText value="<div class='permission' lang='#{loginSession.right.MENU_CUS_VIEW}'></div>" escape="false"/>
                <div id="content">
                    <div id="menu_top">
                        <div class="dropdown">
                            <div class="select_choise">
                                <a href="#"><span><h:outputText value="#{locale.area}"/></span></a>
                            </div>
                            <div class="select_hidden">
                                <ul>

                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                </ul>
                            </div>
                        </div>
                        <h:panelGroup rendered="#{loginSession.right.CUS_LST_PAR}">
                            <div class="dropdown">
                                <div class="select_choise">
                                    <a href="#">
                                        <span class="department2" lang="<h:outputText value="#{n450_n850.fn850}"/>">
                                            <h:outputText rendered="#{n450_n850.fn850 !=0}" value="#{n450_n850.nv851}"/>
                                            <h:outputText rendered="#{n450_n850.fn850 ==0}" value="Tất cả"/>
                                        </span>
                                    </a>

                                </div>
                                <div class="select_hidden departmentlistN850">

                                    <ul>
                                        <li><a href="#"><span class="department3" lang="<h:outputText value="0"/>">
                                                    <h:outputText value="Tất cả"/>
                                                </span></a></li>                                  


                                        <a4j:repeat value="#{n450_n850.listComb850}" var="item">
                                            <li><a href="#"><span class="department2" lang="<h:outputText value="#{item.value}"/>">
                                                        <h:outputText value="#{item.label}"/>
                                                    </span></a></li> 
                                                </a4j:repeat>
                                    </ul>
                                </div>
                            </div>
                        </h:panelGroup>
                    </div>
                    <div class="menutop2" style="float:left;width: 98%;margin-left: 0.7%; height: 25px;padding: 2px;">
                        <div style="float:left;margin-right: 2px;">
                            <h:outputLink  rendered="#{loginSession.right.EMP_LST_CRE}" value="editfromemployee.jsp?action=addEmp&height=282px&width=345px" styleClass="fancybox" id="fancybox">
                                <h:graphicImage title="#{locale.addEmployee}" value="../images/icon_addTour.png"/>

                            </h:outputLink>

                        </div>
                        <div style="float:left;margin-left: 2px;margin-right: 2px;">
                            <div class="sidebar_row2">
                                <div class="sidebar">
                                    <div class="sidebar_search">
                                    </div>
                                    <div class="search_box" style="min-height:160px;display: none;padding: 0px;width: 255px !important">
                                        <rich:tabPanel switchType="client">
                                            <rich:tab label="Nhóm">
                                                <h3><h:outputText value="#{locale.search}"/></h3>
                                                <div class="fields_input">
                                                    <input name="" type="text"  value="<h:outputText value="#{locale.search_key}"/>..." onblur="if(this.value=='')this.value='<h:outputText value="#{locale.search_key}"/>...';" onfocus="if(this.value=='<h:outputText value="#{locale.search_key}"/>...')this.value='';" />
                                                    <input name="" type="submit" value="OK" />
                                                </div>

                                                <h4><h:outputText value="#{locale.search_group}"/></h4>

                                                <div class="fields_select">
                                                    <a4j:region>
                                                        <h:selectOneMenu value="#{CustomerBean.groupID}" id="vPhase" styleClass="select_cus"   >

                                                            <f:selectItems value="#{CustomerBean.listGroup}" />
                                                            <a4j:support event="onchange"
                                                                         actionListener="#{CustomerBean.changeGroup}" reRender="reloadn100A,reloadn100,reload2,btnSubmit22" onsubmit="showPleaseWait();" oncomplete="hidePleaseWait();"/>
                                                        </h:selectOneMenu>
                                                    </a4j:region>

                                                </div>

                                                <h3 style="float:left; margin-top:15px"><h:outputText value="#{locale.add_new_group}:"/></h3>
                                                <div class="fields_input" style="border-bottom:none;">
                                                    <h:inputText styleClass="groupname" value="#{k400Controller.KV401}" style="width:188px;" onblur="if(this.value=='')this.value='#{k400Controller.KV401}';" onfocus="if(this.value=='#{k400Controller.KV401}')this.value='';"  />
                                                </div>
                                                <div class="fields_submit">
                                                    <h:panelGroup id="btnSubmit22">
                                                        <h:commandButton   onclick="if( $j('.groupname').val()=='' || $j('.groupname').val()=='Nhập tên nhóm') return false; else return true;"  action="#{k400Controller.saveK400forN100C}" value="Thêm nhóm" styleClass="buttonsave">

                                                        </h:commandButton>
                                                        <h:outputLink  style="color:#fff;"   value="sendMoreSMS.jsp?page=customer&pk400=#{CustomerBean.groupID}&dayss=#{CustomerBean.dayss}&type=#{CustomerBean.ni104}&height=453&amp;width=741&amp;modal=true" styleClass="fancybox buttonsaveS" id="thickbox333"  ><h:outputText value="Gửi SMS"/></h:outputLink>
                                                    </h:panelGroup >
                                                </div>
                                            </rich:tab>
                                            <rich:tab label="Status">
                                                <h3><h:outputText value="#{locale.search}"/></h3>
                                                <div class="fields_input">
                                                    <h:outputText value="Status:" style="float:left;"/>
                                                    <a4j:region>

                                                        <h:selectOneMenu value="#{CustomerBean.FK330}" style="width:200px;float:left;margin-bottom:5px;" styleClass="cbx_editEmp">
                                                            <f:selectItems value="#{CustomerBean.listComboK330}"/>
                                                            <a4j:support event="onchange" onsubmit="showPleaseWait();" oncomplete="hidePleaseWait();" reRender="reloadn100A,reloadn100,reload2,btnSubmit22"  actionListener="#{CustomerBean.reloadStatus}"> 

                                                            </a4j:support>
                                                        </h:selectOneMenu>

                                                    </a4j:region>
                                                    <a4j:region>
                                                        <h:outputText value="Nguồn:" style="float:left;"/>

                                                        <h:selectOneMenu  style="width:200px;float:left;" styleClass="cbx_editEmp" value="#{CustomerBean.FK300}">
                                                            <f:selectItems value="#{CustomerBean.listComboK300}"/>
                                                            <a4j:support event="onchange" onsubmit="showPleaseWait();" oncomplete="hidePleaseWait();" reRender="reloadn100A,reloadn100,reload2,btnSubmit22"  actionListener="#{CustomerBean.reloadStatus1}"> 

                                                            </a4j:support>
                                                        </h:selectOneMenu>


                                                    </a4j:region>
                                                </div>


                                                <h4><h:outputText value="#{locale.search_group}"/></h4>

                                                <div class="fields_select">
                                                    <div style="float: left;">
                                                        <input style="width: 82px;float: left;" value="<h:outputText value="#{CustomerBean.startDateSta}"><f:convertDateTime pattern="dd/MM/yyyy"/> 
                                                               </h:outputText>" type="text" id="leavedate111" name="leavedate111" class="" />
                                                    </div>
                                                    <div style="float: left;">
                                                        <input style="width: 82px;float: left;margin-left: 20px;" value="<h:outputText value="#{CustomerBean.endDateSta}"><f:convertDateTime pattern="dd/MM/yyyy"/> 
                                                               </h:outputText>" type="text" id="leavedate112" name="leavedate112" class="" />
                                                    </div>
                                                    <div style="float: left;">
                                                        <h:panelGroup id="submitStatus">
                                                            <h:commandButton style="float:left;margin-left:25px;margin-bottom:10px;"  actionListener="#{CustomerBean.reloadStatus}" value="Tìm" styleClass="buttonsave">

                                                            </h:commandButton>

                                                        </div>


                                                    </h:panelGroup >


                                                </div>


                                            </rich:tab>

                                        </rich:tabPanel>

                                    </div>
                                </div>
                            </div>
                        </div>

                        <div style="float:left;margin-left: 2px;margin-right: 2px;">
                            <div class="classimageSMS">
                                <img src="../images/smsnew.png" class="sendSMS_person" lang="page=sendSMSitemEmployee" title="Xác nhận  SMS"/>
                            </div>
                        </div>
                        <div style="float:left;margin-left: 2px;margin-right: 2px;">
                            <h:outputLink  rendered="#{loginSession.right.EMP_LST_MAL}" value="popUpSendEmail.jsp?page=employee&step=9&fk100reload=0&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new abc" id="thickbox15"  >
                                <h:graphicImage value="../images/emailnew.png"/>
                            </h:outputLink>
                        </div>
                        <div style="float:left;margin-left: 2px;margin-right: 2px;">
                            <h:commandButton rendered="#{loginSession.right.EMP_LST_EXC}" style="margin-left:0px;" actionListener="#{EmpBean.exportExcel()}"  
                                             onclick="showPleaseWait();"                                   
                                             styleClass="buttonExcel" >                

                            </h:commandButton>
                        </div>
                        <div style="float:right;height: 25px;width: 20%;border:1px solid #B2B7BB;">
                            <h:inputText style="  float: left;height: 25px; margin-left: 0;width: 86%;"  value="#{EmpBean.keySearch}" onfocus="if(this.value=='#{EmpBean.keySearch}')this.value='';" styleClass="text_search"/>

                            <div class="buttonsearch" style="margin-left:5px; float:left; border-radius:8px 8px 8px 8px; ">
                                <div class="group cssgroup" >
                                    <h:selectOneRadio layout="pageDirection" value="#{EmpBean.typeSearch}" styleClass="feild_sex"  style="margin-left:5px; margin-top:14px; padding:15px; width:195px; height:154px;"   >
                                        <f:selectItem itemValue="0" itemLabel="Tất cả"/>
                                        <f:selectItem itemValue="1" itemLabel="Ðiện thoại"/>
                                        <f:selectItem itemValue="2" itemLabel="Họ tên"/>
                                        <f:selectItem itemValue="3" itemLabel="CMND/Passport"/>
                                        <f:selectItem itemValue="4" itemLabel="Email"/>
                                        <f:selectItem itemValue="5" itemLabel="MSNV"/>
                                    </h:selectOneRadio>
                                    <h:commandButton action="#{EmpBean.reload}" value="#{locale.search}" style="margin-left:75px; margin-top:5px;" styleClass="buttonsearch2">
                                    </h:commandButton>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="content_detail">
                        <h:inputHidden value="#{CustomerBean.typeSearch}" id="typeSreas"/>
                        <div class="content_right">
                            <div class="content">
                                <h:inputHidden value="#{CustomerBean.dayss}" id="dayss"/>
                                <div class="list_content" style="margin-top: 0px;" >
                                    <div style="width: 100% !important;">
                                        <table>
                                            <tr>
                                                <td class="democolumn" style="width: 2%"><h:outputText value="STT"/></td>                                        
                                                <td class="democolumn" style="width: 10%"><h:outputText value="Action"/></td>
                                                <td class="democolumn" style="width: 2%">  <h:selectBooleanCheckbox styleClass="checkAll" value=""/></td> 
                                                <td class="democolumn" style="width: 12%"><h:outputText value="Họ tên"/></td>
                                                <td class="democolumn" style="width: 6%"><h:outputText value="MSKH"/></td>
                                                <td class="democolumn" style="width: 8%"><h:outputText value="Giới tính" /></td>
                                                <td class="democolumn" style="width: 6%"><h:outputText value="Tour"/></td>
                                                <td class="democolumn" style="width: 6%"><h:outputText value="Phone" /></td>
                                                <td class="democolumn" style="width: 10%"><h:outputText value="Email"/></td>
                                                <td class="democolumn" style="width: 8%"><h:outputText value="Người GT"/></td>
                                                <td class="democolumn" style="width: 8%"><h:outputText  value="Người CTN"/></td>
                                                <td class="democolumn" style="width: 8%"><h:outputText  value="Rating"/></td>
                                                <td class="democolumn" style="width: 8%"><h:outputText  value="Người cập nhật"/></td>
                                            </tr>
                                              <a4j:repeat  value="#{CustomerBean.listCustomer}" var="item" rowKeyVar="index">
                                       
                                                <tr class="noteRow" lang="<h:outputText value="#{item.pn100}"/>">
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center; width: 2%; border-left: 1px solid #C4C0C9;">
                                                        <h:outputText value="#{index+1}"/>
                                                    </td>

                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 6%;">
                                                        <h:outputLink   value="workChargeDashInput.jsp?action=addDash&pn100=#{item.pn100}&fk100=#{item.fk100}&page=customer.jsp&height=300px&width=500px" styleClass="fancybox">
                                                            <img src="../images/workcharge.png" alt="CH" title="Chăm sóc khách hàng" style="padding-right:4px;"/>
                                                        </h:outputLink>
                                                        <h:outputLink   rendered="#{loginSession.right.CUS_LST_MOD}"  value="customerInputExpand.jsp?action=editEmp&flagform=2&pn100=#{item.pn100}&table=A&ni104=#{item.ni104}&height=300px&width=400px" styleClass="fancybox">
                                                            <img title="edit" alt="edit" src="../images/edit.png">
                                                            <f:param value="#{item.pn100}" name="pn100"></f:param>
                                                        </h:outputLink>
                                                        <h:outputLink   rendered="#{loginSession.right.EMP_LST_DEL}"  value="deleteCustomer.jsp?action=delete&pn100=#{item.pn100}&table=A&height=300px&width=400px" styleClass="fancybox add_new" id="fancyboxd">
                                                            <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                        </h:outputLink>
                                                        <h:outputLink value="note.jsp?action=addnote&pn100=#{item.pn100}&height=300px&width=400px" styleClass="fancybox" style="float:left;margin-right:5px;" >
                                                            <img src="../images/add_tab.png" alt="Cập nhật ghi chú"/>
                                                        </h:outputLink>
                                                        <h:panelGroup rendered="#{loginSession.right.CUS_LST_TOR}">
                                                            <div class="select_group ">
                                                                <h:outputLink value="listTour.jsp?action=addPTour&flagaddTour=noList&pn100=#{item.pn100}" style="margin-left:-11px;">
                                                                    <div class="choise_groups_tour" lang="<h:outputText value="#{item.pn100}"/>">
                                                                    </div> </h:outputLink>
                                                                </div>
                                                        </h:panelGroup>

                                                        <h:panelGroup rendered="#{loginSession.right.CUS_LST_UPB}">
                                                            <div class="select_group ">
                                                                <div class="choise_groups" lang="<h:outputText value="#{item.pn100}"/>"></div>
                                                                <div class="choise_groups_hiden">
                                                                    <div class="group_header"><h:outputText value="Nhóm"/></div>
                                                                    <div class="group_list_cus" lang="<h:outputText value="#{item.pn100}"/>">
                                                                        <a4j:repeat value="#{CustomerBean.listQ400Filter}" var="q400">
                                                                            <h:outputText value="#{q400.label}" styleClass="updateq400"  lang="#{q400.val}"/>  
                                                                        </a4j:repeat>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </h:panelGroup>

                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 2%">
                                                        <div style="text-align: center;width: 100%;">
                                                            <h:selectBooleanCheckbox styleClass="check_select" lang="#{item.pn100}" style="float:left;margin-left:3px !important;" value=""/>
                                                        </div>
                                                    </td>

                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="width: 10%">
                                                        <div style="text-align: left;width: 100%;">
                                                            <h:outputText value="#{item.nv102} #{item.nv127} #{item.nv103} (#{item.old})"/>
                                                        </div>
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 6%">
                                                        <h:outputText value="#{item.nv116} "/>
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="width: 8%">
                                                        <div style="text-align: center;width: 100%;">
                                                           <h:outputText value="#{item.nv107}"/> 

                                                        </div>

                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 6%">
                                                         <h:outputText value="#{item.vv031}" styleClass="vv031" style="float:left;margin-left:5px;padding:4px;"/>

                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 6%">
                                                        <h:outputText value="#{item.nv121}" styleClass="sendSMS_person" lang="page=sendSMSitemEmployee&group=1&hoten=#{item.hoten}&phone=#{item.nv121}&fn100=#{item.pn100}"/>
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: left;width:6%">
                                                        <h:outputLink value="popupSendMailPerson.jsp?page=employee&idx=#{item.pn100}&mailx=#{item.nv105}&typex=employee&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  ><h:outputText value="#{item.nv105}" /></h:outputLink>
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 6%">
                                                        <h:outputText value="#{item.nd128}" ><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 8%">
                                                        <h:outputText value="#{item.ld201}" ><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText> 
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 8%">
                                                        <h:outputText value="#{item.ld201}" ><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText> 
                                                    </td>
                                                    <td class="democolumn2 <h:outputText rendered="#{index%2 !=0}"  value="odd"/>" style="text-align: center;width: 8%">
                                                        <h:outputText value="#{item.ld201}" ><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText> 
                                                    </td>

                                                </tr>
                                                <tr>
                                                    <td colspan="12">
                                                        <h:panelGroup styleClass="noteContent" >
                                                        </h:panelGroup>
                                                    </td>
                                                </tr>
                                            </a4j:repeat>
                                        </table>
                                    </div>
                                    <div class="fotter-page">
                                        <jsp:include page="../../common/pagingEmployee.jsp"/>
                                    </div>
                                </div>
                            </div>
                            <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                             height="30" width="40" zindex="2000">
                                <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                            </rich:modalPanel>

                        </div>
                    </div>
                </div>
            </a4j:form>

        </body>
    </html>
</f:subview>
<script type="text/javascript" language="javascript">
    var open_cur = 0;
    $j = jQuery.noConflict();
    $j(document).ready(function(){
    
        $j(".department2").live("click",function(){
                    
            fh200 = $j(".donvi").attr("lang");
            fn850 = $j(this).attr("lang");
            fn450 = $j(".department1").attr("lang");
            //   showPleaseWait(); 
            $j.post("N450_N850.jsp?&action=group&fh200="+fh200+"&fn450="+fn450 +"&fn850="+fn850,function(data){
                if(data!=null){ 
                    window.location.href="customer.jsp?action=reloadfordays&dayss="+0+"&flagFN850=10";
                    //       hidePleaseWait();        
                }
            }); 
        });
                
        $j(".department3").live("click",function(){
                     
            fh200 = $j(".donvi").attr("lang");
            fn850 = $j(this).attr("lang");
            fn450 = $j(".department1").attr("lang");
            // showPleaseWait(); 
            $j.post("N450_N850.jsp?&action=group&fh200="+fh200+"&fn450="+fn450 +"&fn850="+fn850+"&emp=null",function(data){
                if(data!=null){ 
                    window.location.href="customer.jsp?action=reloadfordays&dayss="+0+"&flagFN850=10";
                    //       hidePleaseWait();        
                }
            }); 
        });
    });
</script>
<style type="text/css">
    .vv031{
        cursor: pointer;
        color:#0055A6;
    }
    .odd{
        background: #F2F7FC;
    }
    #fancybox-wrap{

    }
    .fields_input{
        float: left;
        margin-top: 8px;
        width: 100%;
    }
    .button-link{
        border:0;
        background:url(../images/bg_submit.gif) repeat-x;
        width:134px;
        float:right;
        margin:19px 0 10px 0;
        color:#ffffff;
        font-size:14px;
        font-weight:bold;
        cursor:pointer;
        border-radius:5px;
        box-shadow:0 2px 3px #666666;
        padding:8px 0;
        text-transform:uppercase;
    }
    .customer-box{
        float:left; width:604px; margin-left:25px;
        border:1px solid #CCCCCC;
        padding:18px 0px 10px 0px;
        background: #E5E8EA;
        border-top: none;

    }
    .customer-box label{
        width:90px;
        text-align: right;
        float:left;
    }
    input{
        float:left;
        margin-left:9px;
    }
    select{
        float:left;
        height: 21px;
        width:166px;
        margin-left:9px;
    }
    .ui-datepicker-header select{
        width:45% !important;
    }
    .header-box{
        margin-left:25px;
        color:#263340;
        margin-top:10px;
        float: left;
        cursor:pointer;
        padding:4px 0px 0px 4px; 
        width:600px;
        border:1px solid #CCCCCC;
        font-size:12px;
        background: #D4D7D8;
        height: 21px;
        font-weight: bold;
    }
    .fixdate .ui-datepicker-trigger  { margin-left: 4px;}

    .boder-bomttom{

    }

    .mail_sms{
        float: right;
        margin-right: -19px;
        margin-top: 5px;
    }
    /*                .buttonsave {
                        background: url("../images/button_left.gif") repeat-x scroll 0 0 transparent;
                        border: 0 none;
                        color: white;
                        cursor: pointer;
                        float: left;
                        font-size: 10px;
                        font-weight: bold;
                        height: 13px;
                        margin-bottom: 5px;
                        margin-right: 20px;
                        margin-top: 3px;
                        padding: 3px 7px;
                        text-transform: uppercase;
                        width: auto;
                    }*/
    .mesage{
        color: red;
        float: left;
        margin-left: 252px;
        margin-top: 20px;
        text-transform: uppercase;

    }
    .fillterby .dropdownby .select_hidden{
        top:23px !important;
    }
    .feild_sex td label{width: 150px !important; color:white; font-size:12px; text-transform: none; margin-left:3px;}

    .updateV500{
        color:#fff;
        text-align: left;
        margin-left:8px;
        cursor: pointer;
        width:95% !important;
    }.updateq400{
        color:#fff;
        text-align: left;
        margin-left:8px;
        cursor: pointer;
        width:95% !important;
    }
    .group_list_cus_tour {
        overflow-y: auto;
        height:300px;
    }
    .buttonsaveS{
        background: url("../images/bg_submit.gif") repeat-x scroll 0 0 transparent;
        border: 0 none;
        border-radius: 5px 5px 5px 5px;
        box-shadow: 0 2px 3px #666666;
        color: #FFFFFF;
        cursor: pointer;
        float: right;
        font-size: 14px;
        font-weight: bold;
        margin: 19px 10px 10px;
        padding: 8px 0;
        text-transform: uppercase;
        width: 98px;
        text-align: center;

    }
    .sidebar .search_box .fields_submit input[type="submit"]{
        width: 98px !important;
        margin-right: 22px;
    }
    .cbxEmp {
        float: right;
        margin-right: 10px;
        margin-top: 28px;
    }
    .lbl_cbxEmp{
        float:left;
    }
    .cbx_editEmp{
        height: 23px;
        line-height: 23px;
        float:left;
    }

    #fancybox-wrap{

    }
    .buttonExcel {
        background: url("../images/excelnew.png") repeat-x scroll 0 0 transparent;
        border: 0 none;
        cursor: pointer;
        float: left;
        height: 25px;
        width: 30px;
    }
    .button-link{
        border:0;
        background:url(../images/bg_submit.gif) repeat-x;
        width:134px;
        float:right;
        margin:19px 0 10px 0;
        color:#ffffff;
        font-size:14px;
        font-weight:bold;
        cursor:pointer;
        border-radius:5px;
        box-shadow:0 2px 3px #666666;
        padding:8px 0;
        text-transform:uppercase;
    }
    div.rateit div.rateit-reset {

        width:0px !important;
    }
    .feild_sex td label{width: 150px !important; color:white; font-size:12px; text-transform: none; margin-left:3px;}

    .buttonsearch2{
        border:0;
        background:url(../images/bg_submit.gif) repeat-x;
        width:68px;

        margin:0px 0 10px 20px;
        color:#ffffff;
        font-size:12px;
        font-weight:bold;
        cursor:pointer;
        border-radius:2px;
        padding:4px 0;
        text-transform:uppercase;
    }
    input{
        float:left;
        margin-left:9px;
    }
    select{
        float:left;
        height: 21px;
        width:166px;
        margin-left:9px;
    }
    .ui-datepicker-header select{
        width:45% !important;
    }
    .group_list_cus{

    }
    .contact_content{
        float:left;
        padding-left: 5px;
        font-style: italic;

    }
    .contact_lable{
        float:left;
        text-align: right;
        width: 70px;
    }
    .contact_contact{
        float:left;                    
        width: 280px;
    }
    .fields_info {
        float: left;
        line-height: 18px;
        margin-left: 11px;
        width: 20% !important;
    }
    .group_manager{
        width: 149px !important;
    }
    .fields_contact {
        float: left;
        line-height: 18px;
        width: 19% !important;
    }
    .vv031{
        margin-left: -3px;
    }
    .dropdownp .select_choise{
        cursor: pointer;
    }
    .dropdownp .select_hidden ul li span {
        cursor: pointer;
    }
    .dropdownp .select_hidden ul li:hover span {
        cursor: pointer;
    }
    .showMessageBirthday{
        background-color: white;
        border: 1px solid gray;
        border-radius: 5px 5px 5px 5px;
        float: left;
        margin-left: 695px;
        margin-top: 10px;
        position: absolute;
        width: 262px;
        z-index: 999;

    }
    .headershowb{
        border-radius: 5px 5px 0px 0px;
        width: 100%;
        background-color:#303C49;
        height: 25px;
    }
    .closeBirthday{
        float: right;
        margin-left: 243px;
        margin-top: -38px;
        position: absolute;
        z-index: 9999;
        cursor: pointer;
    }
    .itemdiv{
        background-color: white;
        width: 100%;
        border-bottom: 1px solid gray;
        height: 25px;
        line-height: 25px;
    }

    .itemMessage1{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemMessage2{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemMessage3{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemMessage4{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemdivA{
        float: left;

        width: 100%;
    }
    .itemdivB{
        float: left;
        width: 100%;
    }
    .itemdivC{
        float: left;
        width: 100%;
    }
    .itemdivD{
        float: left;
        width: 100%;
    }
    .rich-tabpanel-content{
        background-color: #E6E9EB;
    }
    #main{
        width:100%;
    }
    #content{
        padding:0px !important;
        width:100%;
    }
    #footer{
        width:100%;
    }
    .title_tour{
        width:100%;
    }

    #content_detail {
        float: left;
        padding-left: 10px;
        padding-right: 10px;
        width: 98.5%;
    }


    #header_content {
        float: right;
        margin-top: 40px;
        width: 84%;
    }
    .showdatafor{
        cursor: pointer;
    }
    .showdatafor1{
        background-color: #fff;
        display: none;position: absolute;z-index: 9999;width: 169px;height: 132px;
        border: 1px solid #567676;
    }
    .imageSMS img{
        height: 29px;
        margin-top: -3px;
        width: 24px;
    }
    .democolumn{

        background: none repeat scroll 0 0 #4884B5;
        font-size: 11px;
        color: #FFFFFF;
        height: 35px;
        font-weight: bold;
        text-align: center;
    }
    .active{
        display: block;

    }
    .democolumn2{
        background: none repeat scroll 0 0 #FFFFFF;
        font-size: 11px;
        color: #000000;
        padding: 3px;
    }
    .odd{
        background: #E0EFFC;
    }
    .menutop2 img{
        height: 25px;
        width: 25px;
    }
    .sidebar_search {
        background: url("../images/searchnew.png") no-repeat scroll 100% 0 transparent;
        border: 0 none;
        cursor: pointer;
        float: left;
        height: 25px !important;
        line-height: 43px;
        margin-top: 0;
        padding-right: 31px;
        text-align: left;
    }

    .sidebar_search span {

        color: #FFFFFF;
        float: left;
        font-size: 14px;
        height: 36px;
        padding-left: 18px;
        text-shadow: 2px 2px 3px #333333;
        text-transform: uppercase;
        width: 200px;
    }
    .sidebar{
        width: 32px;
    }
</style>